extends Control


# Declare member variables here. Examples:
# var a = 2
# var b = "text"


# Called when the node enters the scene tree for the first time.
func _ready():
	self.pause_mode = Node.PAUSE_MODE_PROCESS
	$AnimationPlayer.play("ending")
	$Label.visible = false
	$TextureRect.visible = true
	$BackToMainMenuBtn.visible = false

# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
#	pass

func AfterPlay():
	$Label.visible = true
	$TextureRect.visible = false
	$BackToMainMenuBtn.visible = true
#	CommonSignals.emit_signal("GamePause")


func _on_BackToMainMenuBtn_pressed():
#	CommonSignals.emit_signal("ToMainMenu")
	get_tree().reload_current_scene()
	get_tree().paused = false
	
